#ifndef __newmoon_ccompressor_h
#define __newmoon_ccompressor_h

//#include "cROMFile.h"
#include <stdio.h>

class Compressor
{
public:
	u32 baseaddr;
	
	u32 Compress(u8* data, u8* out, u32 size);
	u32 Compress(FILE* file, u32 addr, u8* out, u32 size);
	u32 Decompress(u8* data, u8* out, u32 size);
	u32 Decompress(FILE* file, u32 addr, u8* out, u32 size);
protected:
	u8 GetByte(u32 pos);
	virtual u32 _Compress(u8* out, u32 size) = 0;
	virtual u32 _Decompress(u8* out, u32 size) = 0;
private:
	u8* data;
	FILE* file;
};

#endif
